-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature : Get CPU temperature over the RPC #139
Conversation
Thanks for adding a test. PRs that introduce new tests make me happy :) Your PR introduces a compiler warning. Can you fix that? I personally run
|
Thanks @Sword-Smith for your review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple minor nits but otherwise lgtm. thx for the pr!
Thank you for your contribution, @elielnfinic. The PR was merged manually through CLI by me. You have of course been credited :) |
Merged through CLI. |
Addresses : #138.
Description:
This pull request introduces the implementation of the get_cpu_temps method, which retrieves the CPU temperature for use in the dashboard. This feature leverages the systemstat library.
The
get_cpu_temps
method is located in/src/rpc_server.rs
to facilitate its use via the RPC server.It's important to note that the systemstat library does not support CPU temperature retrieval on Silicon Macs, as Apple has disabled this feature. Consequently, the associated test is designed to expect a None result when running on macOS.
As in
/src/bin/dashboard_src/overview_screen.rs
,cpu_temperature
is a Option, I converted the f32 we get fromsystemstat
into f64.